package ninja.awesome.game.gameobject;

import java.util.LinkedList;

import ninja.awesome.framework.Graphics;
import ninja.awesome.framework.Image;
import ninja.awesome.game.MainGameScreen;
import ninja.awesome.game.classes.Friendly;
import ninja.awesome.game.compat.Rectangle;
import ninja.awesome.game.main.Animation;
import ninja.awesome.game.main.Controller;
import ninja.awesome.game.main.Sprites;

public class Health extends GameObj implements Friendly {

	private Sprites s;

	private Image[] ninjaHealthIcon;

	private int HEALTH = 150;
	public LinkedList<Life> ll;

	private int randNumber = 0;

	int anim = 0;

	Controller c;
	MainGameScreen game;

	Animation currentHealthBar;

	public Health(int x, int y, MainGameScreen game, Controller c, Sprites s) {
		super(x, y);
		this.game = game;
		this.c = c;
		this.s = s;
		ninjaHealthIcon = this.s.getninjaHealthIcon();

		currentHealthBar = new Animation(0, ninjaHealthIcon[0], 78, 115, 1);
	}

	@Override
	public void update() {
		currentHealthBar.runAnimation();

	}

	@Override
	public void draw(Graphics g) {

		currentHealthBar.setAction(0);
		currentHealthBar.drawAnimation(g, 2, 2);

	}

	@Override
	public Rectangle getBounds() {
		return new Rectangle(xLoc, yLoc, 100, 100);
	}

	// GETTERS
	@Override
	public int getX() {
		return xLoc;
	}

	@Override
	public int getY() {
		return yLoc;
	}

	// Setters
	public void SetX(int x) {
		this.xLoc = x;
	}

	public void SetY(int y) {
		this.yLoc = y;
	}

}
